﻿Imports System.IO
Public Class ScriptEditor
#Region "Declarations and Dimension"
    Inherits System.Windows.Forms.Form
    Implements IMessageFilter
    Private WM_KEYDOWN As Integer = &H100
    Private WM_KEYUP As Integer = &H101
    Public QuestOpened As Boolean = False
    Private Const VertScrollBar As Int32 = &H115
    Private Const VertScrollBar_Btm As Int32 = 7
    Private Declare Auto Function SendMessage Lib "user32.dll" (ByVal hwnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
    Public sErr As String
    Public bAns As Boolean
    Public ScriptData As String
    Dim localscriptnum As String
    Public ScriptData_Intro
    Public ScriptData_Options
    Public ScriptData_Option(4)
    Public ScriptData_Refresh
#End Region
    Public Function PreFilterMessage(ByRef m As Message) As Boolean Implements IMessageFilter.PreFilterMessage
        Dim keyCode As Keys = CType(CInt(m.WParam), Keys) And Keys.KeyCode
        If m.Msg = WM_KEYDOWN And keyCode = Keys.Escape Then
            Me.Close()
            Application.RemoveMessageFilter(Me) : Return True
        End If
        Return False
    End Function 'PreFilterMessage
    Public Sub SND(ByVal Txt As String)
        OUTPUT.Select(Len(OUTPUT.Text), 0)
        Txt = "/Z" + Txt + "/Z"
        Dim Switches As Integer = -1
        Dim TempStr As String
        Dim TempStr2 As String
        Dim TempInt As Integer
        Dim TempInt2 As Integer = 0
        For TempInt = 1 To Len(Txt) Step 1
            TempStr = Mid(Txt, TempInt, 1)
            If TempStr = "/" Then
                If Mid(Txt, TempInt, 2) = "/B" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFF)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/b" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H66)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/C" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFFFF)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/c" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H6666)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/M" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFF00FF)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/m" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H660066)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/y" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H666600)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/Y" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFFFF00)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/g" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H6600)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/G" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFF00)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/w" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H666666)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/W" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HAAAAAA)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/z" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H333333)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/Z" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFFFFFF)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/R" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&HFF0000)
                    TempInt2 = TempInt
                    Switches += 1
                ElseIf Mid(Txt, TempInt, 2) = "/r" Then
                    If TempInt2 <> 0 Then
                        TempStr2 = Mid(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Txt, "/b", ""), "/B", ""), "/g", ""), "/G", ""), "/m", ""), "/M", ""), "/w", ""), "/W", ""), "/y", ""), "/Y", ""), "/z", ""), "/Z", ""), "/c", ""), "/C", ""), "/r", ""), "/R", ""), TempInt2 - Switches * 2, TempInt - TempInt2 - 2)
                        OUTPUT.SelectedText = TempStr2
                    End If
                    OUTPUT.SelectionColor = Color.FromArgb(&H660000)
                    TempInt2 = TempInt
                    Switches += 1
                End If
            End If
        Next
        OUTPUT.SelectedText = Chr(13)
        SendMessage(OUTPUT.Handle, VertScrollBar, VertScrollBar_Btm, 0)
    End Sub
    Public Function GetFileContents(ByVal FullPath As String, _
            Optional ByRef ErrInfo As String = "") As String

        Dim strContents As String
        Dim objReader As StreamReader
        Try
            objReader = New StreamReader(FullPath)
            strContents = objReader.ReadToEnd()
            Return strContents
            objReader.Close()
            objReader.Dispose()
        Catch Ex As Exception
            Return ""
            ErrInfo = Ex.Message
            MsgBox(ErrInfo, MsgBoxStyle.Critical, "ERROR!")
        End Try
    End Function
    Public Function SaveTextToFile(ByVal strData As String, _
     ByVal FullPath As String, _
       Optional ByVal ErrInfo As String = "") As Boolean

        Dim bAns As Boolean = False
        Dim trynum As Short = 1
        Dim objReader As StreamWriter
        While bAns = False
            Try
                objReader = New StreamWriter(FullPath)
                objReader.Write(strData)
                objReader.Close()
                bAns = True
            Catch Ex As Exception
                ErrInfo = Ex.Message
                If trynum = 1000 Then
                    MsgBox(ErrInfo, MsgBoxStyle.Critical, "ERROR!")
                    bAns = True
                End If
            End Try
        End While
        Return bAns
    End Function
    Public Sub LoadScript(ByVal SCRIPTnum As String)
        If QuestOpened = True Then 'reconfigures the script editor to edit scripts sent by the quest editor
            Me.Text = "Script Editor - Quest Editor Script"
            Button1.Text = "Disabled"
            Button2.Text = "Disabled"
            Button3.Text = "Disabled"
            Button4.Text = "Save And Exit"
            Button5.Text = "Disabled"
            SCRIT.Enabled = False
            Button1.Enabled = False
            Button2.Enabled = False
            Button3.Enabled = False
            Button5.Enabled = False
        Else
            Me.Show()
            Me.Text = "Script Editor"
            Button1.Text = "Save Script"
            Button2.Text = "Save Changes And Exit"
            Button3.Text = "Save As New"
            Button4.Text = "Exit Without Saving"
            Button5.Text = "Clear Form"
            SCRIT.Enabled = True
            Button1.Enabled = True
            Button2.Enabled = True
            Button3.Enabled = True
            Button4.Enabled = True
            Button5.Enabled = True
            ScriptData = GetFileContents(Debugger.DirScripts, sErr)
        End If
        OUTPUT.Text = ""
        SND("/yLoading script data...")
        RB1.Checked = True
        localscriptnum = SCRIPTnum
        If sErr = "" Then
            Dim tempvar As Integer = InStr(ScriptData, "SCRIP#" + SCRIPTnum + "(")
            Dim tempvar2 As Integer
            Dim tmp0 As Integer, tmp1 As Integer = 0, count As Single = 0
            If tempvar > 0 Then
                For tempvar2 = InStr(ScriptData, "SCRIP#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                    If Mid(ScriptData, tempvar2, 1) = ")" Then
                        ScriptData_Intro = Replace(Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))))), " ", "")
                        Exit For
                    End If
                Next
                SND("/yLoading script intro...")
                tempvar = InStr(ScriptData, "INTRO#" + SCRIPTnum + "(")
                For tempvar2 = InStr(ScriptData, "INTRO#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                    If Mid(ScriptData, tempvar2, 1) = ")" Then
                        ScriptData_Intro = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), +tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                        IntroductionText.Text = ScriptData_Intro
                        If InStr(IntroductionText.Text, "[EXIT]") Then
                            IntroductionText.Text = Replace(IntroductionText.Text, "[EXIT]", "")
                            SND("/YScript " + SCRIPTnum + " loaded!")
                            RB0.Checked = True
                            RefreshText.Enabled = False
                            Exit Sub
                        End If
                        Exit For
                    End If
                Next
                SND("/yLoading script options...")
                tempvar = InStr(ScriptData, "OPTIO#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "OPTIO#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Options = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            For tmp0 = 1 To Len(ScriptData_Options) Step 1
                                If Mid(ScriptData_Options, tmp0, 1) = "]" Then
                                    If tmp1 = 0 And count = 0 Then
                                        Option1.Text = Mid(ScriptData_Options, 4, tmp0 - 4)
                                        If InStr(Option1.Text, "<") Then
                                            Dim tmp2 As Integer, tmp3 As Integer
                                            For tmp2 = InStr(Option1.Text, "<") + 1 To Len(Option1.Text) Step 1
                                                If Mid(Option1.Text, tmp2, 1) = "?" Then
                                                    For tmp3 = tmp2 + 3 To Len(Option1.Text)
                                                        If Mid(Option1.Text, tmp3, 1) = ">" Then
                                                            SKQ1.Checked = True
                                                            VNUM1.Text = Mid(Option1.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                            Option1.Text = Replace(Option1.Text, Mid(Option1.Text, InStr(Option1.Text, "<"), 1 + tmp3 - InStr(Option1.Text, "<")), "")
                                                            Exit For
                                                        End If
                                                    Next
                                                    Exit For
                                                ElseIf Mid(Option1.Text, tmp2, 1) = "!" Then
                                                    For tmp3 = tmp2 + 3 To Len(Option1.Text)
                                                        If Mid(Option1.Text, tmp3, 1) = ">" Then
                                                            EKQ1.Checked = True
                                                            VNUM1.Text = Mid(Option1.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                            Option1.Text = Replace(Option1.Text, Mid(Option1.Text, InStr(Option1.Text, "<"), 1 + tmp3 - InStr(Option1.Text, "<")), "")
                                                            Exit For
                                                        End If
                                                    Next
                                                    Exit For
                                                ElseIf Mid(Option1.Text, tmp2, 1) = ";" Then
                                                    For tmp3 = tmp2 + 3 To Len(Option1.Text)
                                                        If Mid(Option1.Text, tmp3, 1) = ">" Then
                                                            SIQ1.Checked = True
                                                            VNUM1.Text = Mid(Option1.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                            Option1.Text = Replace(Option1.Text, Mid(Option1.Text, InStr(Option1.Text, "<"), 1 + tmp3 - InStr(Option1.Text, "<")), "")
                                                            Exit For
                                                        End If
                                                    Next
                                                    Exit For
                                                ElseIf Mid(Option1.Text, tmp2, 1) = ":" Then
                                                    For tmp3 = tmp2 + 3 To Len(Option1.Text)
                                                        If Mid(Option1.Text, tmp3, 1) = ">" Then
                                                            EIQ1.Checked = True
                                                            VNUM1.Text = Mid(Option1.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                            Option1.Text = Replace(Option1.Text, Mid(Option1.Text, InStr(Option1.Text, "<"), 1 + tmp3 - InStr(Option1.Text, "<")), "")
                                                            Exit For
                                                        End If
                                                    Next
                                                    Exit For
                                                ElseIf Mid(Option1.Text, tmp2, 1) = "'" Then
                                                    For tmp3 = tmp2 + 3 To Len(Option1.Text)
                                                        If Mid(Option1.Text, tmp3, 1) = ">" Then
                                                            SDQ1.Checked = True
                                                            VNUM1.Text = Mid(Option1.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                            Option1.Text = Replace(Option1.Text, Mid(Option1.Text, InStr(Option1.Text, "<"), 1 + tmp3 - InStr(Option1.Text, "<")), "")
                                                            Exit For
                                                        End If
                                                    Next
                                                    Exit For
                                                ElseIf Mid(Option1.Text, tmp2, 1) = Chr(31) Then
                                                    For tmp3 = tmp2 + 3 To Len(Option1.Text)
                                                        If Mid(Option1.Text, tmp3, 1) = ">" Then
                                                            EDQ1.Checked = True
                                                            VNUM1.Text = Mid(Option1.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                            Option1.Text = Replace(Option1.Text, Mid(Option1.Text, InStr(Option1.Text, "<"), 1 + tmp3 - InStr(Option1.Text, "<")), "")
                                                            Exit For
                                                        End If
                                                    Next
                                                    Exit For
                                                End If
                                            Next
                                        End If
                                        count += 1
                                    Else
                                        If count = 1 Then
                                            Option2.Text = Mid(ScriptData_Options, tmp1, tmp0 - tmp1)
                                            If InStr(Option2.Text, "<") Then
                                                Dim tmp2 As Integer, tmp3 As Integer
                                                For tmp2 = InStr(Option2.Text, "<") + 1 To Len(Option2.Text) Step 1
                                                    If Mid(Option2.Text, tmp2, 1) = "?" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option2.Text)
                                                            If Mid(Option2.Text, tmp3, 1) = ">" Then
                                                                SKQ2.Checked = True
                                                                VNUM2.Text = Mid(Option2.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option2.Text = Replace(Option2.Text, Mid(Option2.Text, InStr(Option2.Text, "<"), 1 + tmp3 - InStr(Option2.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option2.Text, tmp2, 1) = "!" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option2.Text)
                                                            If Mid(Option2.Text, tmp3, 1) = ">" Then
                                                                EKQ2.Checked = True
                                                                VNUM2.Text = Mid(Option2.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option2.Text = Replace(Option2.Text, Mid(Option2.Text, InStr(Option2.Text, "<"), 1 + tmp3 - InStr(Option2.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option2.Text, tmp2, 1) = ";" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option2.Text)
                                                            If Mid(Option2.Text, tmp3, 1) = ">" Then
                                                                SIQ2.Checked = True
                                                                VNUM2.Text = Mid(Option2.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option2.Text = Replace(Option2.Text, Mid(Option2.Text, InStr(Option2.Text, "<"), 1 + tmp3 - InStr(Option2.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option2.Text, tmp2, 1) = ":" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option2.Text)
                                                            If Mid(Option2.Text, tmp3, 1) = ">" Then
                                                                EIQ2.Checked = True
                                                                VNUM2.Text = Mid(Option2.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option2.Text = Replace(Option2.Text, Mid(Option2.Text, InStr(Option2.Text, "<"), 1 + tmp3 - InStr(Option2.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option2.Text, tmp2, 1) = "'" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option2.Text)
                                                            If Mid(Option2.Text, tmp3, 1) = ">" Then
                                                                SDQ2.Checked = True
                                                                VNUM2.Text = Mid(Option2.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option2.Text = Replace(Option2.Text, Mid(Option2.Text, InStr(Option2.Text, "<"), 1 + tmp3 - InStr(Option2.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option2.Text, tmp2, 1) = Chr(32) Then
                                                        For tmp3 = tmp2 + 3 To Len(Option2.Text)
                                                            If Mid(Option2.Text, tmp3, 1) = ">" Then
                                                                EDQ2.Checked = True
                                                                VNUM2.Text = Mid(Option2.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option2.Text = Replace(Option2.Text, Mid(Option2.Text, InStr(Option2.Text, "<"), 1 + tmp3 - InStr(Option2.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    End If
                                                Next
                                            End If
                                            RB2.Checked = True
                                        ElseIf count = 2 Then
                                            Option3.Text = Mid(ScriptData_Options, tmp1, tmp0 - tmp1)
                                            If InStr(Option3.Text, "<") Then
                                                Dim tmp2 As Integer, tmp3 As Integer
                                                For tmp2 = InStr(Option3.Text, "<") + 1 To Len(Option3.Text) Step 1
                                                    If Mid(Option3.Text, tmp2, 1) = "?" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option3.Text)
                                                            If Mid(Option3.Text, tmp3, 1) = ">" Then
                                                                SKQ3.Checked = True
                                                                VNUM3.Text = Mid(Option3.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option3.Text = Replace(Option3.Text, Mid(Option3.Text, InStr(Option3.Text, "<"), 1 + tmp3 - InStr(Option3.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option3.Text, tmp2, 1) = "!" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option3.Text)
                                                            If Mid(Option3.Text, tmp3, 1) = ">" Then
                                                                EKQ3.Checked = True
                                                                VNUM3.Text = Mid(Option3.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option3.Text = Replace(Option3.Text, Mid(Option3.Text, InStr(Option3.Text, "<"), 1 + tmp3 - InStr(Option3.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option3.Text, tmp2, 1) = ";" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option3.Text)
                                                            If Mid(Option3.Text, tmp3, 1) = ">" Then
                                                                SIQ3.Checked = True
                                                                VNUM3.Text = Mid(Option3.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option3.Text = Replace(Option3.Text, Mid(Option3.Text, InStr(Option3.Text, "<"), 1 + tmp3 - InStr(Option3.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option3.Text, tmp2, 1) = ":" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option3.Text)
                                                            If Mid(Option3.Text, tmp3, 1) = ">" Then
                                                                EIQ3.Checked = True
                                                                VNUM3.Text = Mid(Option3.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option3.Text = Replace(Option3.Text, Mid(Option3.Text, InStr(Option3.Text, "<"), 1 + tmp3 - InStr(Option3.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option3.Text, tmp2, 1) = "'" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option3.Text)
                                                            If Mid(Option3.Text, tmp3, 1) = ">" Then
                                                                SDQ3.Checked = True
                                                                VNUM3.Text = Mid(Option3.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option3.Text = Replace(Option3.Text, Mid(Option3.Text, InStr(Option3.Text, "<"), 1 + tmp3 - InStr(Option3.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option3.Text, tmp2, 1) = Chr(33) Then
                                                        For tmp3 = tmp2 + 3 To Len(Option3.Text)
                                                            If Mid(Option3.Text, tmp3, 1) = ">" Then
                                                                EDQ3.Checked = True
                                                                VNUM3.Text = Mid(Option3.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option3.Text = Replace(Option3.Text, Mid(Option3.Text, InStr(Option3.Text, "<"), 1 + tmp3 - InStr(Option3.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    End If
                                                Next
                                            End If
                                            RB3.Checked = True
                                        ElseIf count = 3 Then
                                            Option4.Text = Mid(ScriptData_Options, tmp1, tmp0 - tmp1)
                                            If InStr(Option4.Text, "<") Then
                                                Dim tmp2 As Integer, tmp3 As Integer
                                                For tmp2 = InStr(Option4.Text, "<") + 1 To Len(Option4.Text) Step 1
                                                    If Mid(Option4.Text, tmp2, 1) = "?" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option4.Text)
                                                            If Mid(Option4.Text, tmp3, 1) = ">" Then
                                                                SKQ4.Checked = True
                                                                VNUM4.Text = Mid(Option4.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option4.Text = Replace(Option4.Text, Mid(Option4.Text, InStr(Option4.Text, "<"), 1 + tmp3 - InStr(Option4.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option4.Text, tmp2, 1) = "!" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option4.Text)
                                                            If Mid(Option4.Text, tmp3, 1) = ">" Then
                                                                EKQ4.Checked = True
                                                                VNUM4.Text = Mid(Option4.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option4.Text = Replace(Option4.Text, Mid(Option4.Text, InStr(Option4.Text, "<"), 1 + tmp3 - InStr(Option4.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option4.Text, tmp2, 1) = ";" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option4.Text)
                                                            If Mid(Option4.Text, tmp3, 1) = ">" Then
                                                                SIQ4.Checked = True
                                                                VNUM4.Text = Mid(Option4.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option4.Text = Replace(Option4.Text, Mid(Option4.Text, InStr(Option4.Text, "<"), 1 + tmp3 - InStr(Option4.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option4.Text, tmp2, 1) = ":" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option4.Text)
                                                            If Mid(Option4.Text, tmp3, 1) = ">" Then
                                                                EIQ4.Checked = True
                                                                VNUM4.Text = Mid(Option4.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option4.Text = Replace(Option4.Text, Mid(Option4.Text, InStr(Option4.Text, "<"), 1 + tmp3 - InStr(Option4.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option4.Text, tmp2, 1) = "'" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option4.Text)
                                                            If Mid(Option4.Text, tmp3, 1) = ">" Then
                                                                SDQ4.Checked = True
                                                                VNUM4.Text = Mid(Option4.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option4.Text = Replace(Option4.Text, Mid(Option4.Text, InStr(Option4.Text, "<"), 1 + tmp3 - InStr(Option4.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option4.Text, tmp2, 1) = Chr(34) Then
                                                        For tmp3 = tmp2 + 3 To Len(Option4.Text)
                                                            If Mid(Option4.Text, tmp3, 1) = ">" Then
                                                                EDQ4.Checked = True
                                                                VNUM4.Text = Mid(Option4.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option4.Text = Replace(Option4.Text, Mid(Option4.Text, InStr(Option4.Text, "<"), 1 + tmp3 - InStr(Option4.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    End If
                                                Next
                                            End If
                                            RB4.Checked = True
                                        ElseIf count = 4 Then
                                            Option5.Text = Mid(ScriptData_Options, tmp1, tmp0 - tmp1)
                                            If InStr(Option5.Text, "<") Then
                                                Dim tmp2 As Integer, tmp3 As Integer
                                                For tmp2 = InStr(Option5.Text, "<") + 1 To Len(Option5.Text) Step 1
                                                    If Mid(Option5.Text, tmp2, 1) = "?" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option5.Text)
                                                            If Mid(Option5.Text, tmp3, 1) = ">" Then
                                                                SKQ5.Checked = True
                                                                VNUM5.Text = Mid(Option5.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option5.Text = Replace(Option5.Text, Mid(Option5.Text, InStr(Option5.Text, "<"), 1 + tmp3 - InStr(Option5.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option5.Text, tmp2, 1) = "!" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option5.Text)
                                                            If Mid(Option5.Text, tmp3, 1) = ">" Then
                                                                EKQ5.Checked = True
                                                                VNUM5.Text = Mid(Option5.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option5.Text = Replace(Option5.Text, Mid(Option5.Text, InStr(Option5.Text, "<"), 1 + tmp3 - InStr(Option5.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option5.Text, tmp2, 1) = ";" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option5.Text)
                                                            If Mid(Option5.Text, tmp3, 1) = ">" Then
                                                                SIQ5.Checked = True
                                                                VNUM5.Text = Mid(Option5.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option5.Text = Replace(Option5.Text, Mid(Option5.Text, InStr(Option5.Text, "<"), 1 + tmp3 - InStr(Option5.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option5.Text, tmp2, 1) = ":" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option5.Text)
                                                            If Mid(Option5.Text, tmp3, 1) = ">" Then
                                                                EIQ5.Checked = True
                                                                VNUM5.Text = Mid(Option5.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option5.Text = Replace(Option5.Text, Mid(Option5.Text, InStr(Option5.Text, "<"), 1 + tmp3 - InStr(Option5.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option5.Text, tmp2, 1) = "'" Then
                                                        For tmp3 = tmp2 + 3 To Len(Option5.Text)
                                                            If Mid(Option5.Text, tmp3, 1) = ">" Then
                                                                SDQ5.Checked = True
                                                                VNUM5.Text = Mid(Option5.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option5.Text = Replace(Option5.Text, Mid(Option5.Text, InStr(Option5.Text, "<"), 1 + tmp3 - InStr(Option5.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    ElseIf Mid(Option5.Text, tmp2, 1) = Chr(35) Then
                                                        For tmp3 = tmp2 + 3 To Len(Option5.Text)
                                                            If Mid(Option5.Text, tmp3, 1) = ">" Then
                                                                EDQ5.Checked = True
                                                                VNUM5.Text = Mid(Option5.Text, tmp2 + 3, tmp3 - tmp2 - 3)
                                                                Option5.Text = Replace(Option5.Text, Mid(Option5.Text, InStr(Option5.Text, "<"), 1 + tmp3 - InStr(Option5.Text, "<")), "")
                                                                Exit For
                                                            End If
                                                        Next
                                                        Exit For
                                                    End If
                                                Next
                                            End If
                                            RB5.Checked = True
                                        End If
                                        count += 1
                                    End If
                                    tmp1 = tmp0 + 5
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
                SND("/yLoading script responses...")
                tempvar = InStr(ScriptData, "SUBO1#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "SUBO1#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Option(0) = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            Response1.Text = ScriptData_Option(0)
                            If InStr(Response1.Text, "[EXIT]") Then
                                Response1.Text = Replace(Response1.Text, "[EXIT]", "")
                                r1e.Checked = True
                            End If
                            If InStr(Response1.Text, "[DEL O1]") Then
                                Response1.Text = Replace(Response1.Text, "[DEL O1]", "")
                                r1do1.Checked = True
                            End If
                            If InStr(Response1.Text, "[DEL O2]") Then
                                Response1.Text = Replace(Response1.Text, "[DEL O2]", "")
                                r1do2.Checked = True
                            End If
                            If InStr(Response1.Text, "[DEL O3]") Then
                                Response1.Text = Replace(Response1.Text, "[DEL O3]", "")
                                r1do3.Checked = True
                            End If
                            If InStr(Response1.Text, "[DEL O4]") Then
                                Response1.Text = Replace(Response1.Text, "[DEL O4]", "")
                                r1do4.Checked = True
                            End If
                            If InStr(Response1.Text, "[DEL O5]") Then
                                Response1.Text = Replace(Response1.Text, "[DEL O5]", "")
                                r1do5.Checked = True
                            End If
                            If VNUM1.Text <> "" Then
                                If InStr(Response1.Text, "[B") > 0 Then
                                    TargetVnum1.Text = Replace(Mid(Response1.Text, InStr(Response1.Text, "[B") + 8 + Len(LTrim(Str(Val(VNUM1.Text)))), Len(Response1.Text)), "]", "")
                                    Response1.Text = Replace(Response1.Text, Mid(Response1.Text, InStr(Response1.Text, "[B"), InStr(Response1.Text, "_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]") - InStr(Response1.Text, "[B") + Len(LTrim(Str(Val(TargetVnum1.Text)))) + Len(LTrim(Str(Val(VNUM1.Text)))) + 3), "")
                                ElseIf InStr(Response1.Text, "[EN") > 0 Then
                                    TargetVnum1.Text = Replace(Mid(Response1.Text, InStr(Response1.Text, "[EN") + 8 + Len(LTrim(Str(Val(VNUM1.Text)))), Len(Response1.Text)), "]", "")
                                    Response1.Text = Replace(Response1.Text, Mid(Response1.Text, InStr(Response1.Text, "[EN"), InStr(Response1.Text, "_" + LTrim(Str(Val(VNUM1.Text))) + "]") - InStr(Response1.Text, "[EN") + Len(LTrim(Str(Val(VNUM1.Text)))) + 3), "")
                                End If
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(ScriptData, "SUBO2#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "SUBO2#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Option(1) = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            Response2.Text = ScriptData_Option(1)
                            If InStr(Response2.Text, "[EXIT]") Then
                                Response2.Text = Replace(Response2.Text, "[EXIT]", "")
                                r2e.Checked = True
                            End If
                            If InStr(Response2.Text, "[DEL O1]") Then
                                Response2.Text = Replace(Response2.Text, "[DEL O1]", "")
                                r2do1.Checked = True
                            End If
                            If InStr(Response2.Text, "[DEL O2]") Then
                                Response2.Text = Replace(Response2.Text, "[DEL O2]", "")
                                r2do2.Checked = True
                            End If
                            If InStr(Response2.Text, "[DEL O3]") Then
                                Response2.Text = Replace(Response2.Text, "[DEL O3]", "")
                                r2do3.Checked = True
                            End If
                            If InStr(Response2.Text, "[DEL O4]") Then
                                Response2.Text = Replace(Response2.Text, "[DEL O4]", "")
                                r2do4.Checked = True
                            End If
                            If InStr(Response2.Text, "[DEL O5]") Then
                                Response2.Text = Replace(Response2.Text, "[DEL O5]", "")
                                r2do5.Checked = True
                            End If
                            If InStr(Response2.Text, "[B") > 0 Then
                                TargetVnum2.Text = Replace(Mid(Response2.Text, InStr(Response2.Text, "[B") + 8 + Len(LTrim(Str(Val(VNUM2.Text)))), Len(Response2.Text)), "]", "")
                                Response2.Text = Replace(Response2.Text, Mid(Response2.Text, InStr(Response2.Text, "[B"), InStr(Response2.Text, "_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]") - InStr(Response2.Text, "[B") + Len(LTrim(Str(Val(TargetVnum2.Text)))) + Len(LTrim(Str(Val(VNUM2.Text)))) + 3), "")
                            ElseIf InStr(Response2.Text, "[EN") > 0 Then
                                TargetVnum2.Text = Replace(Mid(Response2.Text, InStr(Response2.Text, "[EN") + 8 + Len(LTrim(Str(Val(VNUM2.Text)))), Len(Response2.Text)), "]", "")
                                Response2.Text = Replace(Response2.Text, Mid(Response2.Text, InStr(Response2.Text, "[EN"), InStr(Response2.Text, "_" + LTrim(Str(Val(VNUM2.Text))) + "]") - InStr(Response2.Text, "[EN") + Len(LTrim(Str(Val(VNUM2.Text)))) + 3), "")
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(ScriptData, "SUBO3#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "SUBO3#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Option(2) = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            Response3.Text = ScriptData_Option(2)
                            If InStr(Response3.Text, "[EXIT]") Then
                                Response3.Text = Replace(Response3.Text, "[EXIT]", "")
                                r3e.Checked = True
                            End If
                            If InStr(Response3.Text, "[DEL O1]") Then
                                Response3.Text = Replace(Response3.Text, "[DEL O1]", "")
                                r3do1.Checked = True
                            End If
                            If InStr(Response3.Text, "[DEL O2]") Then
                                Response3.Text = Replace(Response3.Text, "[DEL O2]", "")
                                r3do2.Checked = True
                            End If
                            If InStr(Response3.Text, "[DEL O3]") Then
                                Response3.Text = Replace(Response3.Text, "[DEL O3]", "")
                                r3do3.Checked = True
                            End If
                            If InStr(Response3.Text, "[DEL O4]") Then
                                Response3.Text = Replace(Response3.Text, "[DEL O4]", "")
                                r3do4.Checked = True
                            End If
                            If InStr(Response3.Text, "[DEL O5]") Then
                                Response3.Text = Replace(Response3.Text, "[DEL O5]", "")
                                r3do5.Checked = True
                            End If
                            If InStr(Response3.Text, "[B") > 0 Then
                                TargetVnum3.Text = Replace(Mid(Response3.Text, InStr(Response3.Text, "[B") + 8 + Len(LTrim(Str(Val(VNUM3.Text)))), Len(Response3.Text)), "]", "")
                                Response3.Text = Replace(Response3.Text, Mid(Response3.Text, InStr(Response3.Text, "[B"), InStr(Response3.Text, "_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]") - InStr(Response3.Text, "[B") + Len(LTrim(Str(Val(TargetVnum3.Text)))) + Len(LTrim(Str(Val(VNUM3.Text)))) + 3), "")
                            ElseIf InStr(Response3.Text, "[EN") > 0 Then
                                TargetVnum3.Text = Replace(Mid(Response3.Text, InStr(Response3.Text, "[EN") + 8 + Len(LTrim(Str(Val(VNUM3.Text)))), Len(Response3.Text)), "]", "")
                                Response3.Text = Replace(Response3.Text, Mid(Response3.Text, InStr(Response3.Text, "[EN"), InStr(Response3.Text, "_" + LTrim(Str(Val(VNUM3.Text))) + "]") - InStr(Response3.Text, "[EN") + Len(LTrim(Str(Val(VNUM3.Text)))) + 3), "")
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(ScriptData, "SUBO4#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "SUBO4#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Option(3) = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            Response4.Text = ScriptData_Option(3)
                            If InStr(Response4.Text, "[EXIT]") Then
                                Response4.Text = Replace(Response4.Text, "[EXIT]", "")
                                r4e.Checked = True
                            End If
                            If InStr(Response4.Text, "[DEL O1]") Then
                                Response4.Text = Replace(Response4.Text, "[DEL O1]", "")
                                r4do1.Checked = True
                            End If
                            If InStr(Response4.Text, "[DEL O2]") Then
                                Response4.Text = Replace(Response4.Text, "[DEL O2]", "")
                                r4do2.Checked = True
                            End If
                            If InStr(Response4.Text, "[DEL O3]") Then
                                Response4.Text = Replace(Response4.Text, "[DEL O3]", "")
                                r4do3.Checked = True
                            End If
                            If InStr(Response4.Text, "[DEL O4]") Then
                                Response4.Text = Replace(Response4.Text, "[DEL O4]", "")
                                r4do4.Checked = True
                            End If
                            If InStr(Response4.Text, "[DEL O5]") Then
                                Response4.Text = Replace(Response4.Text, "[DEL O5]", "")
                                r4do5.Checked = True
                            End If
                            If InStr(Response4.Text, "[B") > 0 Then
                                TargetVnum4.Text = Replace(Mid(Response4.Text, InStr(Response4.Text, "[B") + 8 + Len(LTrim(Str(Val(VNUM4.Text)))), Len(Response4.Text)), "]", "")
                                Response4.Text = Replace(Response4.Text, Mid(Response4.Text, InStr(Response4.Text, "[B"), InStr(Response4.Text, "_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]") - InStr(Response4.Text, "[B") + Len(LTrim(Str(Val(TargetVnum4.Text)))) + Len(LTrim(Str(Val(VNUM4.Text)))) + 3), "")
                            ElseIf InStr(Response4.Text, "[EN") > 0 Then
                                TargetVnum4.Text = Replace(Mid(Response4.Text, InStr(Response4.Text, "[EN") + 8 + Len(LTrim(Str(Val(VNUM4.Text)))), Len(Response4.Text)), "]", "")
                                Response4.Text = Replace(Response4.Text, Mid(Response4.Text, InStr(Response4.Text, "[EN"), InStr(Response4.Text, "_" + LTrim(Str(Val(VNUM4.Text))) + "]") - InStr(Response4.Text, "[EN") + Len(LTrim(Str(Val(VNUM4.Text)))) + 3), "")
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(ScriptData, "SUBO5#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "SUBO5#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Option(4) = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            Response5.Text = ScriptData_Option(4)
                            If InStr(Response5.Text, "[EXIT]") Then
                                Response5.Text = Replace(Response5.Text, "[EXIT]", "")
                                r5e.Checked = True
                            End If
                            If InStr(Response5.Text, "[DEL O1]") Then
                                Response5.Text = Replace(Response5.Text, "[DEL O1]", "")
                                r5do1.Checked = True
                            End If
                            If InStr(Response5.Text, "[DEL O2]") Then
                                Response5.Text = Replace(Response5.Text, "[DEL O2]", "")
                                r5do2.Checked = True
                            End If
                            If InStr(Response5.Text, "[DEL O3]") Then
                                Response5.Text = Replace(Response5.Text, "[DEL O3]", "")
                                r5do3.Checked = True
                            End If
                            If InStr(Response5.Text, "[DEL O4]") Then
                                Response5.Text = Replace(Response5.Text, "[DEL O4]", "")
                                r5do4.Checked = True
                            End If
                            If InStr(Response5.Text, "[DEL O5]") Then
                                Response5.Text = Replace(Response5.Text, "[DEL O5]", "")
                                r5do5.Checked = True
                            End If
                            If InStr(Response5.Text, "[B") > 0 Then
                                TargetVnum5.Text = Replace(Mid(Response5.Text, InStr(Response5.Text, "[B") + 8 + Len(LTrim(Str(Val(VNUM5.Text)))), Len(Response5.Text)), "]", "")
                                Response5.Text = Replace(Response5.Text, Mid(Response5.Text, InStr(Response5.Text, "[B"), InStr(Response5.Text, "_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]") - InStr(Response5.Text, "[B") + Len(LTrim(Str(Val(TargetVnum5.Text)))) + Len(LTrim(Str(Val(VNUM5.Text)))) + 3), "")
                            ElseIf InStr(Response5.Text, "[EN") > 0 Then
                                TargetVnum5.Text = Replace(Mid(Response5.Text, InStr(Response5.Text, "[ENN") + 8 + Len(LTrim(Str(Val(VNUM5.Text)))), Len(Response5.Text)), "]", "")
                                Response5.Text = Replace(Response5.Text, Mid(Response5.Text, InStr(Response5.Text, "[ENN"), InStr(Response5.Text, "_" + LTrim(Str(Val(VNUM5.Text))) + "]") - InStr(Response5.Text, "[ENN") + Len(LTrim(Str(Val(VNUM5.Text)))) + 3), "")
                            End If
                            Exit For
                        End If
                    Next
                End If
                SND("/yLoading script refresh...")
                tempvar = InStr(ScriptData, "REFRE#" + SCRIPTnum + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(ScriptData, "REFRE#" + SCRIPTnum + "(") To Len(ScriptData) Step 1
                        If Mid(ScriptData, tempvar2, 1) = ")" Then
                            ScriptData_Refresh = Mid(ScriptData, tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(SCRIPTnum)))))
                            RefreshText.Text = ScriptData_Refresh
                            Exit For
                        End If
                    Next
                End If
            End If
            SND("/YScript " + SCRIPTnum + " loaded!")
        Else
            MobEditor.SND("/RERROR: Incorrect Script Number")
            MobEditor.SND("/r(Forced Dialogue Exit)")
            Me.Close()
        End If
        If QuestOpened = True Then
            QuestOpened = False
        End If
    End Sub
    Private Sub savescript(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim TheOption1 As String = Option1.Text, TheOption2 As String = Option2.Text, TheOption3 As String = Option3.Text, TheOption4 As String = Option4.Text, TheOption5 As String = Option5.Text
        Dim TheResponse1 As String = Response1.Text, TheResponse2 As String = Response2.Text, TheResponse3 As String = Response3.Text, TheResponse4 As String = Response4.Text, TheResponse5 As String = Response5.Text
        Dim Addition As String = ""
        SND("/yReplacing delete and exit tags..")
        If r1do1.Checked = True Then TheResponse1 += "[DEL O1]"
        If r1do2.Checked = True Then TheResponse1 += "[DEL O2]"
        If r1do3.Checked = True Then TheResponse1 += "[DEL O3]"
        If r1do4.Checked = True Then TheResponse1 += "[DEL O4]"
        If r1do5.Checked = True Then TheResponse1 += "[DEL O5]"
        If r1e.Checked = True Then TheResponse1 += "[EXIT]"
        If r2do1.Checked = True Then TheResponse2 += "[DEL O1]"
        If r2do2.Checked = True Then TheResponse2 += "[DEL O2]"
        If r2do3.Checked = True Then TheResponse2 += "[DEL O3]"
        If r2do4.Checked = True Then TheResponse2 += "[DEL O4]"
        If r2do5.Checked = True Then TheResponse2 += "[DEL O5]"
        If r2e.Checked = True Then TheResponse2 += "[EXIT]"
        If r3do1.Checked = True Then TheResponse3 += "[DEL O1]"
        If r3do2.Checked = True Then TheResponse3 += "[DEL O2]"
        If r3do3.Checked = True Then TheResponse3 += "[DEL O3]"
        If r3do4.Checked = True Then TheResponse3 += "[DEL O4]"
        If r3do5.Checked = True Then TheResponse3 += "[DEL O5]"
        If r3e.Checked = True Then TheResponse3 += "[EXIT]"
        If r4do1.Checked = True Then TheResponse4 += "[DEL O1]"
        If r4do2.Checked = True Then TheResponse4 += "[DEL O2]"
        If r4do3.Checked = True Then TheResponse4 += "[DEL O3]"
        If r4do4.Checked = True Then TheResponse4 += "[DEL O4]"
        If r4do5.Checked = True Then TheResponse4 += "[DEL O5]"
        If r4e.Checked = True Then TheResponse4 += "[EXIT]"
        If r5do1.Checked = True Then TheResponse5 += "[DEL O1]"
        If r5do2.Checked = True Then TheResponse5 += "[DEL O2]"
        If r5do3.Checked = True Then TheResponse5 += "[DEL O3]"
        If r5do4.Checked = True Then TheResponse5 += "[DEL O4]"
        If r5do5.Checked = True Then TheResponse5 += "[DEL O5]"
        If r5e.Checked = True Then TheResponse5 += "[EXIT]"
        SND("/yReplacing script total amounts...")
        Dim VirID As String = localscriptnum
        ScriptData = GetFileContents(Debugger.DirScripts, sErr)
        Addition = Chr(13) + Chr(13) + "SCRIP#" + VirID + "(" + VirID + ")" + Chr(13)
        If Option5.Enabled = True Then
            If SKQ5.Checked = True Then TheOption5 += "<?Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EKQ5.Checked = True Then TheOption5 += "<!Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SIQ5.Checked = True Then TheOption5 += "<;Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EIQ5.Checked = True Then TheOption5 += "<:Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SDQ5.Checked = True Then TheOption5 += "<'Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EDQ5.Checked = True Then TheOption5 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SKQ4.Checked = True Then TheOption4 += "<?Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EKQ4.Checked = True Then TheOption4 += "<!Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SIQ4.Checked = True Then TheOption4 += "<;Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EIQ4.Checked = True Then TheOption4 += "<:Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SDQ4.Checked = True Then TheOption4 += "<'Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EDQ4.Checked = True Then TheOption4 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "],4.[" + TheOption4 + "],5.[" + TheOption5 + "])" + Chr(13)
        ElseIf Option4.Enabled = True Then
            If SKQ4.Checked = True Then TheOption4 += "<?Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EKQ4.Checked = True Then TheOption4 += "<!Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SIQ4.Checked = True Then TheOption4 += "<;Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EIQ4.Checked = True Then TheOption4 += "<:Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SDQ4.Checked = True Then TheOption4 += "<'Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EDQ4.Checked = True Then TheOption4 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "],4.[" + TheOption4 + "])" + Chr(13)
        ElseIf Option3.Enabled = True Then
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "])" + Chr(13)
        ElseIf Option2.Enabled = True Then
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "])" + Chr(13)
        ElseIf Option1.Enabled = True Then
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "])" + Chr(13)
        Else
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + "[EXIT])" + Chr(13)
        End If
        If RB0.Checked = False Then Addition += "REFRE#" + VirID + "(" + RefreshText.Text + ")" + Chr(13)
        If Option5.Enabled = True Then
            If SKQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SIQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SDQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SKQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SIQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SDQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EIQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EDQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EKQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EIQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EDQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
            Addition += "SUBO4#" + VirID + "(" + TheResponse4 + ")" + Chr(13)
            Addition += "SUBO5#" + VirID + "(" + TheResponse5 + ")" + Chr(13)
        ElseIf Option4.Enabled = True Then
            If SKQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SIQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SDQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EIQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EDQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
            Addition += "SUBO4#" + VirID + "(" + TheResponse4 + ")" + Chr(13)
        ElseIf Option3.Enabled = True Then
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
        ElseIf Option2.Enabled = True Then
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
        ElseIf Option1.Enabled = True Then
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
        End If
        SND("/yScript compiling as new...")
        SND("/YSaved!")
        Addition = Mid(Addition, 1, Len(Addition) - 1)
        Dim tmp0 As Integer, found As Boolean
        For tmp0 = 1 + InStr(ScriptData, "SCRIP#" + VirID + "(") To Len(ScriptData) Step 1
            If Mid(ScriptData, tmp0, 6) = "SCRIP#" Then
                ScriptData = Replace(ScriptData, Mid(ScriptData, -2 + InStr(ScriptData, "SCRIP#" + VirID + "("), tmp0 - InStr(ScriptData, "SCRIP#" + VirID + "(")), Addition)
                found = True
                Exit For
            End If
        Next
        If found = False Then
            ScriptData = Mid(ScriptData, 1, -3 + InStr(ScriptData, "SCRIP#" + VirID + "(")) + Addition
        End If
        SND(ScriptData)
        bAns = SaveTextToFile(ScriptData, Debugger.DirScripts, sErr)
    End Sub
    Private Sub closeform(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        savescript(0, System.EventArgs.Empty)
        Me.Close()
    End Sub
    Private Sub MobEditorDialogueLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Application.AddMessageFilter(Me)
        RB1.Checked = True
    End Sub
#Region "Form Radiobutton Events"
    Private Sub CheckIt1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RB1.CheckedChanged
        RefreshText.Enabled = True
        If RB1.Checked = True Then
            Tab1.Enabled = True
            Option1.Enabled = True
            Response1.Enabled = True : r1e.Enabled = True : r1do1.Enabled = True : r1do2.Enabled = True : r1do3.Enabled = True : r1do4.Enabled = True : r1do5.Enabled = True
            VNUM1.Enabled = True : TargetVnum1.Enabled = True
            SKQ1.Enabled = True
            EKQ1.Enabled = True
            SIQ1.Enabled = True
            EIQ1.Enabled = True
            SDQ1.Enabled = True
            EDQ1.Enabled = True
        Else
            Tab1.Enabled = False
            Option1.Enabled = False
            Response1.Enabled = False : r1e.Enabled = False : r1do1.Enabled = False : r1do2.Enabled = False : r1do3.Enabled = False : r1do4.Enabled = False : r1do5.Enabled = False
            VNUM1.Enabled = False : TargetVnum1.Enabled = False
            SKQ1.Enabled = False
            EKQ1.Enabled = False
            SIQ1.Enabled = False
            EIQ1.Enabled = False
            SDQ1.Enabled = False
            EDQ1.Enabled = False
        End If
    End Sub
    Private Sub CheckIt2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RB2.CheckedChanged
        RefreshText.Enabled = True
        If RB2.Checked = True Then
            Tab1.Enabled = True
            Tab2.Enabled = True
            Option2.Enabled = True
            Response2.Enabled = True : r2e.Enabled = True : r2do1.Enabled = True : r2do2.Enabled = True : r2do3.Enabled = True : r2do4.Enabled = True : r2do5.Enabled = True
            VNUM2.Enabled = True : TargetVnum2.Enabled = True
            SKQ2.Enabled = True
            EKQ2.Enabled = True
            SIQ2.Enabled = True
            EIQ2.Enabled = True
            SDQ2.Enabled = True
            EDQ2.Enabled = True
            Option1.Enabled = True
            Response1.Enabled = True : r1e.Enabled = True : r1do1.Enabled = True : r1do2.Enabled = True : r1do3.Enabled = True : r1do4.Enabled = True : r1do5.Enabled = True
            VNUM1.Enabled = True : TargetVnum1.Enabled = True
            SKQ1.Enabled = True
            EKQ1.Enabled = True
            SIQ1.Enabled = True
            EIQ1.Enabled = True
            SDQ1.Enabled = True
            EDQ1.Enabled = True
        Else
            Tab1.Enabled = False
            Tab2.Enabled = False
            Option1.Enabled = False
            Response1.Enabled = False : r1e.Enabled = False : r1do1.Enabled = False : r1do2.Enabled = False : r1do3.Enabled = False : r1do4.Enabled = False : r1do5.Enabled = False
            VNUM1.Enabled = False : TargetVnum1.Enabled = False
            SKQ1.Enabled = False
            EKQ1.Enabled = False
            SIQ1.Enabled = False
            EIQ1.Enabled = False
            SDQ1.Enabled = False
            EDQ1.Enabled = False
            Option2.Enabled = False
            Response2.Enabled = False : r2e.Enabled = False : r2do1.Enabled = False : r2do2.Enabled = False : r2do3.Enabled = False : r2do4.Enabled = False : r2do5.Enabled = False
            VNUM2.Enabled = False : TargetVnum2.Enabled = False
            SKQ2.Enabled = False
            EKQ2.Enabled = False
            SIQ2.Enabled = False
            EIQ2.Enabled = False
            SDQ2.Enabled = False
            EDQ2.Enabled = False
        End If
    End Sub
    Private Sub CheckIt3(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RB3.CheckedChanged
        RefreshText.Enabled = True
        If RB3.Checked = True Then
            Tab1.Enabled = True
            Tab2.Enabled = True
            Tab3.Enabled = True
            Option3.Enabled = True
            Response3.Enabled = True : r3e.Enabled = True : r3do1.Enabled = True : r3do2.Enabled = True : r3do3.Enabled = True : r3do4.Enabled = True : r3do5.Enabled = True
            VNUM3.Enabled = True : TargetVnum3.Enabled = True
            SKQ3.Enabled = True
            EKQ3.Enabled = True
            SIQ3.Enabled = True
            EIQ3.Enabled = True
            SDQ3.Enabled = True
            EDQ3.Enabled = True
            Option2.Enabled = True
            Response2.Enabled = True : r2e.Enabled = True : r2do1.Enabled = True : r2do2.Enabled = True : r2do3.Enabled = True : r2do4.Enabled = True : r2do5.Enabled = True
            VNUM2.Enabled = True : TargetVnum2.Enabled = True
            SKQ2.Enabled = True
            EKQ2.Enabled = True
            SIQ2.Enabled = True
            EIQ2.Enabled = True
            SDQ2.Enabled = True
            EDQ2.Enabled = True
            Option1.Enabled = True
            Response1.Enabled = True : r1e.Enabled = True : r1do1.Enabled = True : r1do2.Enabled = True : r1do3.Enabled = True : r1do4.Enabled = True : r1do5.Enabled = True
            VNUM1.Enabled = True : TargetVnum1.Enabled = True
            SKQ1.Enabled = True
            EKQ1.Enabled = True
            SIQ1.Enabled = True
            EIQ1.Enabled = True
            SDQ1.Enabled = True
            EDQ1.Enabled = True
        Else
            Tab1.Enabled = False
            Tab2.Enabled = False
            Tab3.Enabled = False
            Option1.Enabled = False
            Response1.Enabled = False : r1e.Enabled = False : r1do1.Enabled = False : r1do2.Enabled = False : r1do3.Enabled = False : r1do4.Enabled = False : r1do5.Enabled = False
            VNUM1.Enabled = False : TargetVnum1.Enabled = False
            SKQ1.Enabled = False
            EKQ1.Enabled = False
            SIQ1.Enabled = False
            EIQ1.Enabled = False
            SDQ1.Enabled = False
            EDQ1.Enabled = False
            Option2.Enabled = False
            Response2.Enabled = False : r2e.Enabled = False : r2do1.Enabled = False : r2do2.Enabled = False : r2do3.Enabled = False : r2do4.Enabled = False : r2do5.Enabled = False
            VNUM2.Enabled = False : TargetVnum2.Enabled = False
            SKQ2.Enabled = False
            EKQ2.Enabled = False
            SIQ2.Enabled = False
            EIQ2.Enabled = False
            SDQ2.Enabled = False
            EDQ2.Enabled = False
            Option3.Enabled = False
            Response3.Enabled = False : r3e.Enabled = False : r3do1.Enabled = False : r3do2.Enabled = False : r3do3.Enabled = False : r3do4.Enabled = False : r3do5.Enabled = False
            VNUM3.Enabled = False : TargetVnum3.Enabled = False
            SKQ3.Enabled = False
            EKQ3.Enabled = False
            SIQ3.Enabled = False
            EIQ3.Enabled = False
            SDQ3.Enabled = False
            EDQ3.Enabled = False
        End If
    End Sub
    Private Sub CheckIt4(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RB4.CheckedChanged
        RefreshText.Enabled = True
        If RB4.Checked = True Then
            Tab1.Enabled = True
            Tab2.Enabled = True
            Tab3.Enabled = True
            Tab4.Enabled = True
            Option4.Enabled = True
            Response4.Enabled = True : r4e.Enabled = True : r4do1.Enabled = True : r4do2.Enabled = True : r4do3.Enabled = True : r4do4.Enabled = True : r4do5.Enabled = True
            VNUM4.Enabled = True : TargetVnum4.Enabled = True
            SKQ4.Enabled = True
            EKQ4.Enabled = True
            SIQ4.Enabled = True
            EIQ4.Enabled = True
            SDQ4.Enabled = True
            EDQ4.Enabled = True
            Option3.Enabled = True
            Response3.Enabled = True : r3e.Enabled = True : r3do1.Enabled = True : r3do2.Enabled = True : r3do3.Enabled = True : r3do4.Enabled = True : r3do5.Enabled = True
            VNUM3.Enabled = True : TargetVnum3.Enabled = True
            SKQ3.Enabled = True
            EKQ3.Enabled = True
            SIQ3.Enabled = True
            EIQ3.Enabled = True
            SDQ3.Enabled = True
            EDQ3.Enabled = True
            Option2.Enabled = True
            Response2.Enabled = True : r2e.Enabled = True : r2do1.Enabled = True : r2do2.Enabled = True : r2do3.Enabled = True : r2do4.Enabled = True : r2do5.Enabled = True
            VNUM2.Enabled = True : TargetVnum2.Enabled = True
            SKQ2.Enabled = True
            EKQ2.Enabled = True
            SIQ2.Enabled = True
            EIQ2.Enabled = True
            SDQ2.Enabled = True
            EDQ2.Enabled = True
            Option1.Enabled = True
            Response1.Enabled = True : r1e.Enabled = True : r1do1.Enabled = True : r1do2.Enabled = True : r1do3.Enabled = True : r1do4.Enabled = True : r1do5.Enabled = True
            VNUM1.Enabled = True : TargetVnum1.Enabled = True
            SKQ1.Enabled = True
            EKQ1.Enabled = True
            SIQ1.Enabled = True
            EIQ1.Enabled = True
            SDQ1.Enabled = True
            EDQ1.Enabled = True
        Else
            Tab1.Enabled = False
            Tab2.Enabled = False
            Tab3.Enabled = False
            Tab4.Enabled = False
            Option1.Enabled = False
            Response1.Enabled = False : r1e.Enabled = False : r1do1.Enabled = False : r1do2.Enabled = False : r1do3.Enabled = False : r1do4.Enabled = False : r1do5.Enabled = False
            VNUM1.Enabled = False : TargetVnum1.Enabled = False
            SKQ1.Enabled = False
            EKQ1.Enabled = False
            SIQ1.Enabled = False
            EIQ1.Enabled = False
            SDQ1.Enabled = False
            EDQ1.Enabled = False
            Option2.Enabled = False
            Response2.Enabled = False : r2e.Enabled = False : r2do1.Enabled = False : r2do2.Enabled = False : r2do3.Enabled = False : r2do4.Enabled = False : r2do5.Enabled = False
            VNUM2.Enabled = False : TargetVnum2.Enabled = False
            SKQ2.Enabled = False
            EKQ2.Enabled = False
            SIQ2.Enabled = False
            EIQ2.Enabled = False
            SDQ2.Enabled = False
            EDQ2.Enabled = False
            Option3.Enabled = False
            Response3.Enabled = False : r3e.Enabled = False : r3do1.Enabled = False : r3do2.Enabled = False : r3do3.Enabled = False : r3do4.Enabled = False : r3do5.Enabled = False
            VNUM3.Enabled = False : TargetVnum3.Enabled = False
            SKQ3.Enabled = False
            EKQ3.Enabled = False
            SIQ3.Enabled = False
            EIQ3.Enabled = False
            SDQ3.Enabled = False
            EDQ3.Enabled = False
            Option4.Enabled = False
            Response4.Enabled = False : r4e.Enabled = False : r4do1.Enabled = False : r4do2.Enabled = False : r4do3.Enabled = False : r4do4.Enabled = False : r4do5.Enabled = False
            VNUM4.Enabled = False : TargetVnum4.Enabled = False
            SKQ4.Enabled = False
            EKQ4.Enabled = False
            SIQ4.Enabled = False
            EIQ4.Enabled = False
            SDQ4.Enabled = False
            EDQ4.Enabled = False
        End If
    End Sub
    Private Sub CheckIt5(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RB5.CheckedChanged
        RefreshText.Enabled = True
        If RB5.Checked = True Then
            Tab1.Enabled = True
            Tab2.Enabled = True
            Tab3.Enabled = True
            Tab4.Enabled = True
            Tab5.Enabled = True
            Option5.Enabled = True
            Response5.Enabled = True : r5e.Enabled = True : r5do1.Enabled = True : r5do2.Enabled = True : r5do3.Enabled = True : r5do4.Enabled = True : r5do5.Enabled = True
            VNUM5.Enabled = True : TargetVnum5.Enabled = True
            SKQ5.Enabled = True
            EKQ5.Enabled = True
            SIQ5.Enabled = True
            EIQ5.Enabled = True
            SDQ5.Enabled = True
            EDQ5.Enabled = True
            Option4.Enabled = True
            Response4.Enabled = True : r4e.Enabled = True : r4do1.Enabled = True : r4do2.Enabled = True : r4do3.Enabled = True : r4do4.Enabled = True : r4do5.Enabled = True
            VNUM4.Enabled = True : TargetVnum4.Enabled = True
            SKQ4.Enabled = True
            EKQ4.Enabled = True
            SIQ4.Enabled = True
            EIQ4.Enabled = True
            SDQ4.Enabled = True
            EDQ4.Enabled = True
            Option3.Enabled = True
            Response3.Enabled = True : r3e.Enabled = True : r3do1.Enabled = True : r3do2.Enabled = True : r3do3.Enabled = True : r3do4.Enabled = True : r3do5.Enabled = True
            VNUM3.Enabled = True : TargetVnum3.Enabled = True
            SKQ3.Enabled = True
            EKQ3.Enabled = True
            SIQ3.Enabled = True
            EIQ3.Enabled = True
            SDQ3.Enabled = True
            EDQ3.Enabled = True
            Option2.Enabled = True
            Response2.Enabled = True : r2e.Enabled = True : r2do1.Enabled = True : r2do2.Enabled = True : r2do3.Enabled = True : r2do4.Enabled = True : r2do5.Enabled = True
            VNUM2.Enabled = True : TargetVnum2.Enabled = True
            SKQ2.Enabled = True
            EKQ2.Enabled = True
            SIQ2.Enabled = True
            EIQ2.Enabled = True
            SDQ2.Enabled = True
            EDQ2.Enabled = True
            Option1.Enabled = True
            Response1.Enabled = True : r1e.Enabled = True : r1do1.Enabled = True : r1do2.Enabled = True : r1do3.Enabled = True : r1do4.Enabled = True : r1do5.Enabled = True
            VNUM1.Enabled = True : TargetVnum1.Enabled = True
            SKQ1.Enabled = True
            EKQ1.Enabled = True
            SIQ1.Enabled = True
            EIQ1.Enabled = True
            SDQ1.Enabled = True
            EDQ1.Enabled = True
        Else
            Tab1.Enabled = False
            Tab2.Enabled = False
            Tab3.Enabled = False
            Tab4.Enabled = False
            Tab5.Enabled = False
            Option1.Enabled = False
            Response1.Enabled = False : r1e.Enabled = False : r1do1.Enabled = False : r1do2.Enabled = False : r1do3.Enabled = False : r1do4.Enabled = False : r1do5.Enabled = False
            VNUM1.Enabled = False : TargetVnum1.Enabled = False
            SKQ1.Enabled = False
            EKQ1.Enabled = False
            SIQ1.Enabled = False
            EIQ1.Enabled = False
            SDQ1.Enabled = False
            EDQ1.Enabled = False
            Option2.Enabled = False
            Response2.Enabled = False : r2e.Enabled = False : r2do1.Enabled = False : r2do2.Enabled = False : r2do3.Enabled = False : r2do4.Enabled = False : r2do5.Enabled = False
            VNUM2.Enabled = False : TargetVnum2.Enabled = False
            SKQ2.Enabled = False
            EKQ2.Enabled = False
            SIQ2.Enabled = False
            EIQ2.Enabled = False
            SDQ2.Enabled = False
            EDQ2.Enabled = False
            Option3.Enabled = False
            Response3.Enabled = False : r3e.Enabled = False : r3do1.Enabled = False : r3do2.Enabled = False : r3do3.Enabled = False : r3do4.Enabled = False : r3do5.Enabled = False
            VNUM3.Enabled = False : TargetVnum3.Enabled = False
            SKQ3.Enabled = False
            EKQ3.Enabled = False
            SIQ3.Enabled = False
            EIQ3.Enabled = False
            SDQ3.Enabled = False
            EDQ3.Enabled = False
            Option4.Enabled = False
            Response4.Enabled = False : r4e.Enabled = False : r4do1.Enabled = False : r4do2.Enabled = False : r4do3.Enabled = False : r4do4.Enabled = False : r4do5.Enabled = False
            VNUM4.Enabled = False : TargetVnum4.Enabled = False
            SKQ4.Enabled = False
            EKQ4.Enabled = False
            SIQ4.Enabled = False
            EIQ4.Enabled = False
            SDQ4.Enabled = False
            EDQ4.Enabled = False
            Option5.Enabled = False
            Response5.Enabled = False : r5e.Enabled = False : r5do1.Enabled = False : r5do2.Enabled = False : r5do3.Enabled = False : r5do4.Enabled = False : r5do5.Enabled = False
            VNUM5.Enabled = False : TargetVnum5.Enabled = False
            SKQ5.Enabled = False
            EKQ5.Enabled = False
            SIQ5.Enabled = False
            EIQ5.Enabled = False
            SDQ5.Enabled = False
            EDQ5.Enabled = False
        End If
    End Sub
    Private Sub CheckIt1Full(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SKQ1.CheckedChanged, SIQ1.CheckedChanged, SDQ1.CheckedChanged, EKQ1.CheckedChanged, EIQ1.CheckedChanged, EDQ1.CheckedChanged
        If SKQ1.Checked = True Then
            EKQ1.Checked = False
            SIQ1.Checked = False
            EIQ1.Checked = False
            SDQ1.Checked = False
            EDQ1.Checked = False
        ElseIf EKQ1.Checked = True Then
            SKQ1.Checked = False
            SIQ1.Checked = False
            EIQ1.Checked = False
            SDQ1.Checked = False
            EDQ1.Checked = False
        ElseIf SIQ1.Checked = True Then
            SKQ1.Checked = False
            EKQ1.Checked = False
            EIQ1.Checked = False
            SDQ1.Checked = False
            EDQ1.Checked = False
        ElseIf EIQ1.Checked = True Then
            SKQ1.Checked = False
            EKQ1.Checked = False
            SIQ1.Checked = False
            SDQ1.Checked = False
            EDQ1.Checked = False
        ElseIf SDQ1.Checked = True Then
            SKQ1.Checked = False
            EKQ1.Checked = False
            SIQ1.Checked = False
            EIQ1.Checked = False
            EDQ1.Checked = False
        ElseIf EDQ1.Checked = True Then
            SKQ1.Checked = False
            EKQ1.Checked = False
            SIQ1.Checked = False
            EIQ1.Checked = False
            SDQ1.Checked = False
        End If
        If SKQ1.Checked = True Or SIQ1.Checked = True Or SDQ1.Checked = True Then
            TargetVnum1.Enabled = True
        Else
            TargetVnum1.Enabled = False
        End If
    End Sub
    Private Sub CheckIt2Full(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SKQ2.CheckedChanged, SIQ2.CheckedChanged, SDQ2.CheckedChanged, EKQ2.CheckedChanged, EIQ2.CheckedChanged, EDQ2.CheckedChanged
        If SKQ2.Checked = True Then
            EKQ2.Checked = False
            SIQ2.Checked = False
            EIQ2.Checked = False
            SDQ2.Checked = False
            EDQ2.Checked = False
        ElseIf EKQ2.Checked = True Then
            SKQ2.Checked = False
            SIQ2.Checked = False
            EIQ2.Checked = False
            SDQ2.Checked = False
            EDQ2.Checked = False
        ElseIf SIQ2.Checked = True Then
            SKQ2.Checked = False
            EKQ2.Checked = False
            EIQ2.Checked = False
            SDQ2.Checked = False
            EDQ2.Checked = False
        ElseIf EIQ2.Checked = True Then
            SKQ2.Checked = False
            EKQ2.Checked = False
            SIQ2.Checked = False
            SDQ2.Checked = False
            EDQ2.Checked = False
        ElseIf SDQ2.Checked = True Then
            SKQ2.Checked = False
            EKQ2.Checked = False
            SIQ2.Checked = False
            EIQ2.Checked = False
            EDQ2.Checked = False
        ElseIf EDQ2.Checked = True Then
            SKQ2.Checked = False
            EKQ2.Checked = False
            SIQ2.Checked = False
            EIQ2.Checked = False
            SDQ2.Checked = False
        End If
        If SKQ2.Checked = True Or SIQ2.Checked = True Or SDQ2.Checked = True Then
            TargetVnum2.Enabled = True
        Else
            TargetVnum2.Enabled = False
        End If
    End Sub
    Private Sub CheckIt3Full(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SKQ3.CheckedChanged, SIQ3.CheckedChanged, SDQ3.CheckedChanged, EKQ3.CheckedChanged, EIQ3.CheckedChanged, EDQ3.CheckedChanged
        If SKQ3.Checked = True Then
            EKQ3.Checked = False
            SIQ3.Checked = False
            EIQ3.Checked = False
            SDQ3.Checked = False
            EDQ3.Checked = False
        ElseIf EKQ3.Checked = True Then
            SKQ3.Checked = False
            SIQ3.Checked = False
            EIQ3.Checked = False
            SDQ3.Checked = False
            EDQ3.Checked = False
        ElseIf SIQ3.Checked = True Then
            SKQ3.Checked = False
            EKQ3.Checked = False
            EIQ3.Checked = False
            SDQ3.Checked = False
            EDQ3.Checked = False
        ElseIf EIQ3.Checked = True Then
            SKQ3.Checked = False
            EKQ3.Checked = False
            SIQ3.Checked = False
            SDQ3.Checked = False
            EDQ3.Checked = False
        ElseIf SDQ3.Checked = True Then
            SKQ3.Checked = False
            EKQ3.Checked = False
            SIQ3.Checked = False
            EIQ3.Checked = False
            EDQ3.Checked = False
        ElseIf EDQ3.Checked = True Then
            SKQ3.Checked = False
            EKQ3.Checked = False
            SIQ3.Checked = False
            EIQ3.Checked = False
            SDQ3.Checked = False
        End If
        If SKQ3.Checked = True Or SIQ3.Checked = True Or SDQ3.Checked = True Then
            TargetVnum3.Enabled = True
        Else
            TargetVnum3.Enabled = False
        End If
    End Sub
    Private Sub CheckIt4Full(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SKQ4.CheckedChanged, SIQ4.CheckedChanged, SDQ4.CheckedChanged, EKQ4.CheckedChanged, EIQ4.CheckedChanged, EDQ4.CheckedChanged
        If SKQ4.Checked = True Then
            EKQ4.Checked = False
            SIQ4.Checked = False
            EIQ4.Checked = False
            SDQ4.Checked = False
            EDQ4.Checked = False
        ElseIf EKQ4.Checked = True Then
            SKQ4.Checked = False
            SIQ4.Checked = False
            EIQ4.Checked = False
            SDQ4.Checked = False
            EDQ4.Checked = False
        ElseIf SIQ4.Checked = True Then
            SKQ4.Checked = False
            EKQ4.Checked = False
            EIQ4.Checked = False
            SDQ4.Checked = False
            EDQ4.Checked = False
        ElseIf EIQ4.Checked = True Then
            SKQ4.Checked = False
            EKQ4.Checked = False
            SIQ4.Checked = False
            SDQ4.Checked = False
            EDQ4.Checked = False
        ElseIf SDQ4.Checked = True Then
            SKQ4.Checked = False
            EKQ4.Checked = False
            SIQ4.Checked = False
            EIQ4.Checked = False
            EDQ4.Checked = False
        ElseIf EDQ4.Checked = True Then
            SKQ4.Checked = False
            EKQ4.Checked = False
            SIQ4.Checked = False
            EIQ4.Checked = False
            SDQ4.Checked = False
        End If
        If SKQ4.Checked = True Or SIQ4.Checked = True Or SDQ4.Checked = True Then
            TargetVnum4.Enabled = True
        Else
            TargetVnum4.Enabled = False
        End If
    End Sub
    Private Sub CheckIt5Full(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SKQ5.CheckedChanged, SIQ5.CheckedChanged, SDQ5.CheckedChanged, EKQ5.CheckedChanged, EIQ5.CheckedChanged, EDQ5.CheckedChanged
        If SKQ5.Checked = True Then
            EKQ5.Checked = False
            SIQ5.Checked = False
            EIQ5.Checked = False
            SDQ5.Checked = False
            EDQ5.Checked = False
        ElseIf EKQ5.Checked = True Then
            SKQ5.Checked = False
            SIQ5.Checked = False
            EIQ5.Checked = False
            SDQ5.Checked = False
            EDQ5.Checked = False
        ElseIf SIQ5.Checked = True Then
            SKQ5.Checked = False
            EKQ5.Checked = False
            EIQ5.Checked = False
            SDQ5.Checked = False
            EDQ5.Checked = False
        ElseIf EIQ5.Checked = True Then
            SKQ5.Checked = False
            EKQ5.Checked = False
            SIQ5.Checked = False
            SDQ5.Checked = False
            EDQ5.Checked = False
        ElseIf SDQ5.Checked = True Then
            SKQ5.Checked = False
            EKQ5.Checked = False
            SIQ5.Checked = False
            EIQ5.Checked = False
            EDQ5.Checked = False
        ElseIf EDQ5.Checked = True Then
            SKQ5.Checked = False
            EKQ5.Checked = False
            SIQ5.Checked = False
            EIQ5.Checked = False
            SDQ5.Checked = False
        End If
        If SKQ5.Checked = True Or SIQ5.Checked = True Or SDQ5.Checked = True Then
            TargetVnum5.Enabled = True
        Else
            TargetVnum5.Enabled = False
        End If
    End Sub
#End Region
    Private Sub SaveAsNew(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim TheOption1 As String = Option1.Text, TheOption2 As String = Option2.Text, TheOption3 As String = Option3.Text, TheOption4 As String = Option4.Text, TheOption5 As String = Option5.Text
        Dim TheResponse1 As String = Response1.Text, TheResponse2 As String = Response2.Text, TheResponse3 As String = Response3.Text, TheResponse4 As String = Response4.Text, TheResponse5 As String = Response5.Text
        Dim Addition As String = ""
        SND("/yAdding delete and exit tags..")
        If r1do1.Checked = True Then TheResponse1 += "[DEL O1]"
        If r1do2.Checked = True Then TheResponse1 += "[DEL O2]"
        If r1do3.Checked = True Then TheResponse1 += "[DEL O3]"
        If r1do4.Checked = True Then TheResponse1 += "[DEL O4]"
        If r1do5.Checked = True Then TheResponse1 += "[DEL O5]"
        If r1e.Checked = True Then TheResponse1 += "[EXIT]"
        If r2do1.Checked = True Then TheResponse2 += "[DEL O1]"
        If r2do2.Checked = True Then TheResponse2 += "[DEL O2]"
        If r2do3.Checked = True Then TheResponse2 += "[DEL O3]"
        If r2do4.Checked = True Then TheResponse2 += "[DEL O4]"
        If r2do5.Checked = True Then TheResponse2 += "[DEL O5]"
        If r2e.Checked = True Then TheResponse2 += "[EXIT]"
        If r3do1.Checked = True Then TheResponse3 += "[DEL O1]"
        If r3do2.Checked = True Then TheResponse3 += "[DEL O2]"
        If r3do3.Checked = True Then TheResponse3 += "[DEL O3]"
        If r3do4.Checked = True Then TheResponse3 += "[DEL O4]"
        If r3do5.Checked = True Then TheResponse3 += "[DEL O5]"
        If r3e.Checked = True Then TheResponse3 += "[EXIT]"
        If r4do1.Checked = True Then TheResponse4 += "[DEL O1]"
        If r4do2.Checked = True Then TheResponse4 += "[DEL O2]"
        If r4do3.Checked = True Then TheResponse4 += "[DEL O3]"
        If r4do4.Checked = True Then TheResponse4 += "[DEL O4]"
        If r4do5.Checked = True Then TheResponse4 += "[DEL O5]"
        If r4e.Checked = True Then TheResponse4 += "[EXIT]"
        If r5do1.Checked = True Then TheResponse5 += "[DEL O1]"
        If r5do2.Checked = True Then TheResponse5 += "[DEL O2]"
        If r5do3.Checked = True Then TheResponse5 += "[DEL O3]"
        If r5do4.Checked = True Then TheResponse5 += "[DEL O4]"
        If r5do5.Checked = True Then TheResponse5 += "[DEL O5]"
        If r5e.Checked = True Then TheResponse5 += "[EXIT]"
        SND("/yUpdating script total amounts...")
        Dim Aint As Integer, VirID As String = "0"
        ScriptData = GetFileContents(Debugger.DirScripts, sErr)
        For Aint = InStr(ScriptData, "TOTAL#") To Len(ScriptData) Step 1
            If Mid(ScriptData, Aint, 1) = "(" And Aint > 0 Then
                VirID = LTrim(Str(Val(Mid(ScriptData, InStr(ScriptData, "TOTAL#") + 6, Aint - InStr(ScriptData, "TOTAL#") - 6) + 1)))
                Exit For
            End If
        Next
        Addition = Chr(13) + Chr(13) + "SCRIP#" + VirID + "(" + VirID + ")" + Chr(13)
        If Option5.Enabled = True Then
            If SKQ5.Checked = True Then TheOption5 += "<?Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EKQ5.Checked = True Then TheOption5 += "<!Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SIQ5.Checked = True Then TheOption5 += "<;Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EIQ5.Checked = True Then TheOption5 += "<:Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SDQ5.Checked = True Then TheOption5 += "<'Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EDQ5.Checked = True Then TheOption5 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SKQ4.Checked = True Then TheOption4 += "<?Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EKQ4.Checked = True Then TheOption4 += "<!Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SIQ4.Checked = True Then TheOption4 += "<;Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EIQ4.Checked = True Then TheOption4 += "<:Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SDQ4.Checked = True Then TheOption4 += "<'Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EDQ4.Checked = True Then TheOption4 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "],4.[" + TheOption4 + "],5.[" + TheOption5 + "])" + Chr(13)
        ElseIf Option4.Enabled = True Then
            If SKQ4.Checked = True Then TheOption4 += "<?Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EKQ4.Checked = True Then TheOption4 += "<!Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SIQ4.Checked = True Then TheOption4 += "<;Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EIQ4.Checked = True Then TheOption4 += "<:Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SDQ4.Checked = True Then TheOption4 += "<'Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EDQ4.Checked = True Then TheOption4 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "],4.[" + TheOption4 + "])" + Chr(13)
        ElseIf Option3.Enabled = True Then
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "])" + Chr(13)
        ElseIf Option2.Enabled = True Then
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "])" + Chr(13)
        ElseIf Option1.Enabled = True Then
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "])" + Chr(13)
        Else
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + "[EXIT])" + Chr(13)
        End If
        Addition += "REFRE#" + VirID + "(" + RefreshText.Text + ")" + Chr(13)
        If Option5.Enabled = True Then
            If SKQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SIQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SDQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SKQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SIQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SDQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EIQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EDQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EKQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EIQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EDQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
            Addition += "SUBO4#" + VirID + "(" + TheResponse4 + ")" + Chr(13)
            Addition += "SUBO5#" + VirID + "(" + TheResponse5 + ")" + Chr(13)
        ElseIf Option4.Enabled = True Then
            If SKQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SIQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SDQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EIQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EDQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
            Addition += "SUBO4#" + VirID + "(" + TheResponse4 + ")" + Chr(13)
        ElseIf Option3.Enabled = True Then
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
        ElseIf Option2.Enabled = True Then
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
        ElseIf Option1.Enabled = True Then
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)

        End If
        SND("/yScript compiling as new...")
        SND("/YSaved!")
        ScriptData = Replace(ScriptData, "TOTAL#" + LTrim(Str(Val(VirID) - 1)) + "(" + LTrim(Str(Val(VirID) - 1)) + ")", "TOTAL#" + VirID + "(" + VirID + ")") + Addition
        bAns = SaveTextToFile(ScriptData, Debugger.DirScripts, sErr)
    End Sub
    Private Sub exitwithoutsaving(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        'this saves if coming from the quest editor... which explains the length of the subroutine. needs to be cleaned up.. bad.
        Dim TheOption1 As String = Option1.Text, TheOption2 As String = Option2.Text, TheOption3 As String = Option3.Text, TheOption4 As String = Option4.Text, TheOption5 As String = Option5.Text
        Dim TheResponse1 As String = Response1.Text, TheResponse2 As String = Response2.Text, TheResponse3 As String = Response3.Text, TheResponse4 As String = Response4.Text, TheResponse5 As String = Response5.Text
        Dim Addition As String = ""
        QuestEditor.SND("/yAdding delete and exit tags..")
        If r1do1.Checked = True Then TheResponse1 += "[DEL O1]"
        If r1do2.Checked = True Then TheResponse1 += "[DEL O2]"
        If r1do3.Checked = True Then TheResponse1 += "[DEL O3]"
        If r1do4.Checked = True Then TheResponse1 += "[DEL O4]"
        If r1do5.Checked = True Then TheResponse1 += "[DEL O5]"
        If r1e.Checked = True Then TheResponse1 += "[EXIT]"
        If r2do1.Checked = True Then TheResponse2 += "[DEL O1]"
        If r2do2.Checked = True Then TheResponse2 += "[DEL O2]"
        If r2do3.Checked = True Then TheResponse2 += "[DEL O3]"
        If r2do4.Checked = True Then TheResponse2 += "[DEL O4]"
        If r2do5.Checked = True Then TheResponse2 += "[DEL O5]"
        If r2e.Checked = True Then TheResponse2 += "[EXIT]"
        If r3do1.Checked = True Then TheResponse3 += "[DEL O1]"
        If r3do2.Checked = True Then TheResponse3 += "[DEL O2]"
        If r3do3.Checked = True Then TheResponse3 += "[DEL O3]"
        If r3do4.Checked = True Then TheResponse3 += "[DEL O4]"
        If r3do5.Checked = True Then TheResponse3 += "[DEL O5]"
        If r3e.Checked = True Then TheResponse3 += "[EXIT]"
        If r4do1.Checked = True Then TheResponse4 += "[DEL O1]"
        If r4do2.Checked = True Then TheResponse4 += "[DEL O2]"
        If r4do3.Checked = True Then TheResponse4 += "[DEL O3]"
        If r4do4.Checked = True Then TheResponse4 += "[DEL O4]"
        If r4do5.Checked = True Then TheResponse4 += "[DEL O5]"
        If r4e.Checked = True Then TheResponse4 += "[EXIT]"
        If r5do1.Checked = True Then TheResponse5 += "[DEL O1]"
        If r5do2.Checked = True Then TheResponse5 += "[DEL O2]"
        If r5do3.Checked = True Then TheResponse5 += "[DEL O3]"
        If r5do4.Checked = True Then TheResponse5 += "[DEL O4]"
        If r5do5.Checked = True Then TheResponse5 += "[DEL O5]"
        If r5e.Checked = True Then TheResponse5 += "[EXIT]"
        Dim Aint As Integer, VirID As String = "0"
        For Aint = InStr(ScriptData, "TOTAL#") To Len(ScriptData) Step 1
            If Mid(ScriptData, Aint, 1) = "(" And Aint > 0 Then
                VirID = LTrim(Str(Val(Mid(ScriptData, InStr(ScriptData, "TOTAL#") + 6, Aint - InStr(ScriptData, "TOTAL#") - 6) + 1)))
                Exit For
            End If
        Next
        Addition = Chr(13) + Chr(13) + "SCRIP#" + VirID + "(" + VirID + ")" + Chr(13)
        If Option5.Enabled = True Then
            If SKQ5.Checked = True Then TheOption5 += "<?Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EKQ5.Checked = True Then TheOption5 += "<!Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SIQ5.Checked = True Then TheOption5 += "<;Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EIQ5.Checked = True Then TheOption5 += "<:Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SDQ5.Checked = True Then TheOption5 += "<'Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If EDQ5.Checked = True Then TheOption5 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM5.Text))) + ">"
            If SKQ4.Checked = True Then TheOption4 += "<?Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EKQ4.Checked = True Then TheOption4 += "<!Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SIQ4.Checked = True Then TheOption4 += "<;Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EIQ4.Checked = True Then TheOption4 += "<:Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SDQ4.Checked = True Then TheOption4 += "<'Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EDQ4.Checked = True Then TheOption4 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "],4.[" + TheOption4 + "],5.[" + TheOption5 + "])" + Chr(13)
        ElseIf Option4.Enabled = True Then
            If SKQ4.Checked = True Then TheOption4 += "<?Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EKQ4.Checked = True Then TheOption4 += "<!Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SIQ4.Checked = True Then TheOption4 += "<;Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EIQ4.Checked = True Then TheOption4 += "<:Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SDQ4.Checked = True Then TheOption4 += "<'Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If EDQ4.Checked = True Then TheOption4 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM4.Text))) + ">"
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "],4.[" + TheOption4 + "])" + Chr(13)
        ElseIf Option3.Enabled = True Then
            If SKQ3.Checked = True Then TheOption3 += "<?Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EKQ3.Checked = True Then TheOption3 += "<!Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SIQ3.Checked = True Then TheOption3 += "<;Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EIQ3.Checked = True Then TheOption3 += "<:Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SDQ3.Checked = True Then TheOption3 += "<'Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If EDQ3.Checked = True Then TheOption3 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM3.Text))) + ">"
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "],3.[" + TheOption3 + "])" + Chr(13)
        ElseIf Option2.Enabled = True Then
            If SKQ2.Checked = True Then TheOption2 += "<?Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EKQ2.Checked = True Then TheOption2 += "<!Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SIQ2.Checked = True Then TheOption2 += "<;Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EIQ2.Checked = True Then TheOption2 += "<:Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SDQ2.Checked = True Then TheOption2 += "<'Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If EDQ2.Checked = True Then TheOption2 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM2.Text))) + ">"
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "],2.[" + TheOption2 + "])" + Chr(13)
        ElseIf Option1.Enabled = True Then
            If SKQ1.Checked = True Then TheOption1 += "<?Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EKQ1.Checked = True Then TheOption1 += "<!Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SIQ1.Checked = True Then TheOption1 += "<;Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EIQ1.Checked = True Then TheOption1 += "<:Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If SDQ1.Checked = True Then TheOption1 += "<'Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            If EDQ1.Checked = True Then TheOption1 += "<" + Chr(34) + "Q_" + LTrim(Str(Val(VNUM1.Text))) + ">"
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + ")" + Chr(13)
            Addition += "OPTIO#" + VirID + "(1.[" + TheOption1 + "])" + Chr(13)
        Else
            Addition += "INTRO#" + VirID + "(" + IntroductionText.Text + "[EXIT])" + Chr(13)
        End If
        Addition += "REFRE#" + VirID + "(" + RefreshText.Text + ")" + Chr(13)
        If Option5.Enabled = True Then
            If SKQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SIQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SDQ5.Checked = True Then TheResponse5 += "[BEG Q_" + LTrim(Str(Val(VNUM5.Text))) + "," + LTrim(Str(Val(TargetVnum5.Text))) + "]"
            If SKQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SIQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SDQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EIQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EDQ5.Checked = True Then TheResponse5 += "[END Q_" + LTrim(Str(Val(VNUM5.Text))) + "]"
            If EKQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EIQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EDQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
            Addition += "SUBO4#" + VirID + "(" + TheResponse4 + ")" + Chr(13)
            Addition += "SUBO5#" + VirID + "(" + TheResponse5 + ")" + Chr(13)
        ElseIf Option4.Enabled = True Then
            If SKQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SIQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SDQ4.Checked = True Then TheResponse4 += "[BEG Q_" + LTrim(Str(Val(VNUM4.Text))) + "," + LTrim(Str(Val(TargetVnum4.Text))) + "]"
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EIQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EDQ4.Checked = True Then TheResponse4 += "[END Q_" + LTrim(Str(Val(VNUM4.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
            Addition += "SUBO4#" + VirID + "(" + TheResponse4 + ")" + Chr(13)
        ElseIf Option3.Enabled = True Then
            If SKQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SIQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SDQ3.Checked = True Then TheResponse3 += "[BEG Q_" + LTrim(Str(Val(VNUM3.Text))) + "," + LTrim(Str(Val(TargetVnum3.Text))) + "]"
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EIQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EDQ3.Checked = True Then TheResponse3 += "[END Q_" + LTrim(Str(Val(VNUM3.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
            Addition += "SUBO3#" + VirID + "(" + TheResponse3 + ")" + Chr(13)
        ElseIf Option2.Enabled = True Then
            If SKQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SIQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SDQ2.Checked = True Then TheResponse2 += "[BEG Q_" + LTrim(Str(Val(VNUM2.Text))) + "," + LTrim(Str(Val(TargetVnum2.Text))) + "]"
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EIQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EDQ2.Checked = True Then TheResponse2 += "[END Q_" + LTrim(Str(Val(VNUM2.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
            Addition += "SUBO2#" + VirID + "(" + TheResponse2 + ")" + Chr(13)
        ElseIf Option1.Enabled = True Then
            If SKQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SIQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If SDQ1.Checked = True Then TheResponse1 += "[BEG Q_" + LTrim(Str(Val(VNUM1.Text))) + "," + LTrim(Str(Val(TargetVnum1.Text))) + "]"
            If EKQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EIQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            If EDQ1.Checked = True Then TheResponse1 += "[END Q_" + LTrim(Str(Val(VNUM1.Text))) + "]"
            Addition += "SUBO1#" + VirID + "(" + TheResponse1 + ")" + Chr(13)
        End If
        QuestEditor.SND("/yScript saving...")
        QuestEditor.SND("/YSaved!")
        ScriptData = Replace(ScriptData, "TOTAL#" + LTrim(Str(Val(VirID) - 1)) + "(" + LTrim(Str(Val(VirID) - 1)) + ")", "TOTAL#" + VirID + "(" + VirID + ")") + Addition
        QuestEditor.SessionData = ScriptData
        SND(ScriptData)
        ' Me.Close()
    End Sub
    Private Sub ClearForm(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        r1e.Checked = False : r2e.Checked = False : r3e.Checked = False : r4e.Checked = False : r5e.Checked = False
        r1do1.Checked = False : r1do2.Checked = False : r1do3.Checked = False : r1do4.Checked = False : r1do5.Checked = False
        r1do1.Checked = False : r2do2.Checked = False : r2do3.Checked = False : r2do4.Checked = False : r2do5.Checked = False
        r3do1.Checked = False : r3do2.Checked = False : r3do3.Checked = False : r3do4.Checked = False : r3do5.Checked = False
        r4do1.Checked = False : r4do2.Checked = False : r4do3.Checked = False : r4do4.Checked = False : r4do5.Checked = False
        r5do1.Checked = False : r5do2.Checked = False : r5do3.Checked = False : r5do4.Checked = False : r5do5.Checked = False
        Response1.Text = "" : Response2.Text = "" : Response3.Text = "" : Response4.Text = "" : Response5.Text = ""
        IntroductionText.Text = "" : RefreshText.Text = "" : Option1.Text = "" : Option2.Text = "" : Option3.Text = "" : Option4.Text = "" : Option5.Text = ""
        SKQ1.Checked = False : SKQ2.Checked = False : SKQ3.Checked = False : SKQ4.Checked = False : SKQ5.Checked = False
        EKQ1.Checked = False : EKQ2.Checked = False : EKQ3.Checked = False : EKQ4.Checked = False : EKQ5.Checked = False
        SIQ1.Checked = False : SIQ2.Checked = False : SIQ3.Checked = False : SIQ4.Checked = False : SIQ5.Checked = False
        EIQ1.Checked = False : EIQ2.Checked = False : EIQ3.Checked = False : EIQ4.Checked = False : EIQ5.Checked = False
        SDQ1.Checked = False : SDQ2.Checked = False : SDQ3.Checked = False : SDQ4.Checked = False : SDQ5.Checked = False
        EDQ1.Checked = False : EDQ2.Checked = False : EDQ3.Checked = False : EDQ4.Checked = False : EDQ5.Checked = False
        VNUM1.Text = "" : VNUM2.Text = "" : VNUM3.Text = "" : VNUM4.Text = "" : VNUM5.Text = ""
        TargetVnum1.Text = "" : TargetVnum2.Text = "" : TargetVnum3.Text = "" : TargetVnum4.Text = "" : TargetVnum5.Text = ""
        RB1.Checked = True
    End Sub
    Private Sub startit0(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RB0.CheckedChanged
        RefreshText.Enabled = False
    End Sub
    Private Sub Response2_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Response5.KeyPress, Response4.KeyPress, Response3.KeyPress, Response2.KeyPress, Response1.KeyPress
        Dim keyascii As Integer = AscW(e.KeyChar)
        Dim isnumber As Boolean = Char.IsNumber(e.KeyChar)
        Dim isletter As Boolean = Char.IsLetter(e.KeyChar)
        If keyascii = 13 Then
            e.Handled = True
        End If
    End Sub
    Private Sub LoadScripts(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SCRIT.DropDown
        SCRIT.Items.Clear()
        Dim int2 As Integer
        Dim int3 As Integer
        Dim CurNum As Integer = 1
        Dim str1 As String = Replace(Str(CurNum), " ", "")
        ScriptData = GetFileContents(Debugger.DirScripts, sErr)
        Dim astr As String = ""
        Dim aint As Integer
        Dim mshort As String = ""
        For aint = InStr(ScriptData, "TOTAL#") To Len(ScriptData) Step 1
            If Mid(ScriptData, aint, 1) = "(" Then
                astr = LTrim(Str(Val(Mid(ScriptData, InStr(ScriptData, "TOTAL#") + 6, aint - InStr(ScriptData, "TOTAL#") - 6))))
                ScriptData = Replace(ScriptData, Mid(ScriptData, InStr(ScriptData, "TOTAL#"), 8 + Len(astr) * 2), "TOTAL#" + astr + "(" + astr + ")")
                Exit For
            End If
        Next
        For int2 = 1 To Val(astr) Step 1
            For int3 = InStr(ScriptData, "INTRO#" + LTrim(Str(int2))) To Len(ScriptData) Step 1
                If Mid(ScriptData, int3, 1) = ")" Then
                    SCRIT.Items.Add(LTrim(Str(int2)) + ". " + Mid(ScriptData, InStr(ScriptData, "INTRO#" + LTrim(Str(int2))) + 7 + Len(LTrim(Str(int2))), int3 - 14 - Len(LTrim(Str(int2))) * 2 - InStr(ScriptData, "INTRO#" + LTrim(Str(int2))) + 7 + Len(LTrim(Str(int2)))))
                    Exit For
                End If
            Next
        Next
    End Sub
    Private Sub LoadTheScript(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SCRIT.SelectedIndexChanged
        Dim tmp1 As Integer
        Dim tmpstr As String = ""
        If SCRIT.Text <> "" Then
            For tmp1 = 1 To Len(SCRIT.Text) Step 1
                If Mid(SCRIT.Text, tmp1, 1) = "." Then
                    tmpstr = Mid(SCRIT.Text, 1, tmp1 - 1)
                    LoadScript(tmpstr)
                    Exit For
                End If
            Next
        Else
            SND("/RERROR: No SCRIT number inputed")
        End If
    End Sub
    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        SND("/C[/cHelp/C]")
        SND("/C  <P>/c  = New Paragraph. Use this in introduction, refresh, and response strings.")
        SND("/C  <!>/c  = Emote. Use this in introduction, refresh, and response strings.")
        SND("/C  <$>#%/c= Reward money in # amount and % type where type can be S for Sovern, D for Dover, or V for Vern.")
        SND("/C  <#>% /c= Reward item % where % is the items VirID, or Virifying Identification.")
    End Sub
End Class